Photo electrochemical (PEC) etching may be used when etching a semiconductor substrate. Patent Literature 1, 2 describes a technique of etching a GaN semiconductor substrate using the photo electrochemical etching. In Patent Literature 1, a GaN semiconductor substrate placed horizontally in an etching liquid is irradiated from above with UV light (ultraviolet rays) having a wavelength shorter than the wavelength (365 nm) which corresponds to the band gap of GaN. This generates electron-hole pairs in the GaN. Electrons are extracted by the applied bias while the remaining holes migrate to the surface side of the GaN. Then, the GaN reacts with OH-ions in a potassium hydroxide (KOH) aqueous solution to be etched while repeating oxidation/dissolution at the GaN surface. In Patent Literature 2, a mercury lamp as the light source is housed in a holder and immersed in the etching liquid. The holder is provided with an irradiation window and the GaN semiconductor substrate is fixed to the holder to be vertically placed at a position at which the GaN semiconductor substrate is in contact with the irradiation window. The treatment surface (surface in contact with the irradiation window) of the vertically-placed GaN semiconductor substrate is irradiated from its side with light from the light source.